package com.weic.easycache.utils;

import org.xmlpull.v1.XmlPullParser;

import android.util.AttributeSet;
import android.util.Xml;

public class MyResourcesUtils {
	public static AttributeSet getAttributeSet(XmlPullParser parser) {
		if(parser == null) {
			return null;
		}
		AttributeSet attrs = Xml.asAttributeSet(parser);
		// Look for the root node.
		int type;
		try {
			while ((type = parser.next()) != XmlPullParser.START_TAG &&
					type != XmlPullParser.END_DOCUMENT) {
				// Empty
			}
		} catch (Exception e) {
			attrs = null;
		}
		return attrs;
	}
}
